package android.slc.box.core.virtual_android;

import io.reactivex.rxjava3.annotations.Nullable;

import java.io.Serializable;
import java.util.ArrayList;

public class BundleBuilder {
    private final Bundle bundle;

    private BundleBuilder() {
        bundle = new Bundle();
    }

    public static BundleBuilder create() {
        return new BundleBuilder();
    }

    public BundleBuilder putByte(@Nullable String key, byte value) {
        bundle.putByte(key, value);
        return this;
    }

    public BundleBuilder putChar(@Nullable String key, char value) {
        bundle.putChar(key, value);
        return this;
    }

    public BundleBuilder putShort(@Nullable String key, short value) {
        bundle.putShort(key, value);
        return this;
    }


    public BundleBuilder putFloat(@Nullable String key, float value) {
        bundle.putFloat(key, value);
        return this;
    }

    public BundleBuilder putBoolean(@Nullable String key, boolean value) {
        bundle.putBoolean(key, value);
        return this;
    }


    public BundleBuilder putInt(@Nullable String key, int value) {
        bundle.putInt(key, value);
        return this;
    }

    public BundleBuilder putLong(@Nullable String key, long value) {
        bundle.putLong(key, value);
        return this;
    }


    public BundleBuilder putDouble(@Nullable String key, double value) {
        bundle.putDouble(key, value);
        return this;
    }

    public BundleBuilder putString(@Nullable String key, @Nullable String value) {
        bundle.putString(key, value);
        return this;
    }

    public BundleBuilder putIntegerArrayList(@Nullable String key, @Nullable ArrayList<Integer> value) {
        bundle.putIntegerArrayList(key, value);
        return this;
    }

    public BundleBuilder putStringArrayList(@Nullable String key, @Nullable ArrayList<String> value) {
        bundle.putStringArrayList(key, value);
        return this;
    }

    public BundleBuilder putBooleanArray(@Nullable String key, @Nullable boolean[] value) {
        bundle.putBooleanArray(key, value);
        return this;
    }

    public BundleBuilder putSerializable(@Nullable String key, @Nullable Serializable value) {
        bundle.putSerializable(key, value);
        return this;
    }

    public BundleBuilder putByteArray(@Nullable String key, @Nullable byte[] value) {
        bundle.putByteArray(key, value);
        return this;
    }

    public BundleBuilder putShortArray(@Nullable String key, @Nullable short[] value) {
        bundle.putShortArray(key, value);
        return this;
    }

    public BundleBuilder putCharArray(@Nullable String key, @Nullable char[] value) {
        bundle.putCharArray(key, value);
        return this;
    }

    public BundleBuilder putIntArray(@Nullable String key, @Nullable int[] value) {
        bundle.putIntArray(key, value);
        return this;
    }

    public BundleBuilder putLongArray(@Nullable String key, @Nullable long[] value) {
        bundle.putLongArray(key, value);
        return this;
    }

    public BundleBuilder putFloatArray(@Nullable String key, @Nullable float[] value) {
        bundle.putFloatArray(key, value);
        return this;
    }

    public BundleBuilder putCharSequenceArray(@Nullable String key, @Nullable CharSequence[] value) {
        bundle.putCharSequenceArray(key, value);
        return this;
    }

    public BundleBuilder putBundle(@Nullable String key, @Nullable Bundle value) {
        bundle.putBundle(key, value);
        return this;
    }

    public Bundle build() {
        return bundle;
    }
}
